﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Matrix
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("number of rows: ");
            int n = Convert.ToInt32(Console.ReadLine());
            List<string> S = new List<string>(n);
            for (int i = 0; i < n; i++)
            {
                S.Add(Console.ReadLine());
            }
            Matrix M = new Matrix(S, n);
            Console.WriteLine(M.SumSecondaryDiagonal());
            //S.SetValue(Console.ReadLine();
            Console.ReadLine();
        }
    }
}
